#ifndef __WATCHPOINT_H__
#define __WATCHPOINT_H__

#include "common.h"

typedef struct watchpoint {
	int NO;
	struct watchpoint *next;
 char exp[32];
	uint32_t value;
	/* TODO: Add more members if necessary */

} WP;
void  print_wp();

WP* new_wp(char* exp);
int free_wp(WP* wp);
bool test_change();
bool  delete_wp(int NO);


/*WP*  new_up(char *exp);

int  free_wp(WP *wp);
WP* new_up(char *exp){
	assert (free_ !=NULL);
	WP *temp =free_;
	free_= free_->next;
	temp->next =NULL;

	bool success =false;
	strcpy(temp->exp,exp);
	temp->value= expr(temp->exp, &success);
	assert(success);

	if(head==NULL){
		head= temp;
	}
	else{
		WP *p= head;
		while(p->next)
		p=p->next;
		p->next =temp;
	}
	return temp;
}
int free_wp(WP *wp){
	if(wp== NULL)
	printf("Input something!\n");
	if(wp== head)
	head= head->next;
	else{
		WP *p =head;
		while(p->next!=wp)
		p= p->next;
		if(p==NULL)
		return 0;
		p-> next =wp->next;
	}
	wp->next =free_;
	free_= wp;
	return 1;
}*/

#endif
